package com.libraryApp.service.impl;

import com.libraryApp.entity.BookDo;
import com.libraryApp.mapper.AppBookMapper;
import com.libraryApp.service.AppUserService;
import com.libraryManage.commons.utils.MVCUtil;
import com.libraryManage.commons.utils.ResponseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @CreateDate 2021-03-09
 * @Author yufang
 */
@Service
public class AppUserServiceImpl implements AppUserService {

    @Autowired
    AppBookMapper appBookMapper;

    @Override
    public ResponseEntity<List<BookDo>> getBookshelfById(Long userId) {

        List<BookDo> list = appBookMapper.getBookshelfById(userId);
        return MVCUtil.response(list);

    }

}
